import { useRef } from "react"

export const UseFd=()=>{
  let item=useRef(null)
  function fd(cd){
    return (...arg)=>{
      clearTimeout(item.current)
      item.current=setTimeout(()=>{
        cd(...arg)
      },5000)
    }
  }
  return fd
}